<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Dotnet2-web 后台管理系统</title>
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<![endif]-->
<%@ include file="/jsp/common/commonJs.jsp"%>
</head>
<body>
	<!--header-->
	<%@ include file="/jsp/top.jsp"%>
	<!--header-->
	<!--aside nav-->
	<%@ include file="/jsp/left.jsp"%>
	<!--aside nav  -->
	<section class="rt_wrap content mCustomScrollbar">
		<div class="rt_content">
			<form id="add" method="post">
				<input type="hidden" name="id" value="${city.id}" />
				<section class="rt_wrap content mCustomScrollbar" style="margin-top: 10px;">
					<ul class="ulColumn2">
						<li>
							<span class="item_name" style="width: 120px;">城市名称：</span> 
							<input type="text" name="cityName" class="textbox textbox_295" value="${city.cityName}" datatype="*" errormsg="请填写城市名称！" placeholder="请填写城市名称！" /> 
							<span class="Validform_checktip"></span></li>
						<li>
							<span class="item_name" style="width: 120px;"></span> 
							<input type="button" value="添加" onclick="sub()" class="link_btn" />
						</li>
					</ul>
				</section>
			</form>
		</div>
	</section>
</body>
<!-- 表单校验 -->
<script>
	var form1 = $("#add").Validform({
		tiptype : 3
	});
	function sub() {
		var options = {
			url : "${path}/city/update.do",
			type : "post",
			dataType : "json",
			success : function(data) {
				if (data.status) {
					alert(data.msg);
					window.location.href = "${path}/city/cityList.do";
				} else {
					alert(data.msg);
				}
			}
		};
		if (form1.check()) {
			$("#add").ajaxSubmit(options);
		}
	}
</script>
</html>